#pragma once

namespace ja2{ namespace sgp
{
	//! Rect class.
	class Rect
	{
		// Attributes
	private:
		//! Left.
		std::uint16_t m_Left;
		//! Top.
		std::uint16_t m_Top;
		//! Right.
		std::uint16_t m_Right;
		//! Bottom.
		std::uint16_t m_Bottom;

		// Operations
	public:
		//! Get left.
		std::uint16_t left() const;
		//! Set left.
		void set_left(std::uint16_t Value);
		//! Get right.
		std::uint16_t right() const;
		//! Set right.
		void set_right(std::uint16_t Value);
		//! Get top.
		std::uint16_t top() const;
		//! Set top.
		void set_top(std::uint16_t Top);
		//! Get bottom.
		std::uint16_t bottom() const;
		//! Set bottom.
		void set_bottom(std::uint16_t Value);
		//! Get height.
		std::uint_least16_t height() const;
		//! Get width.
		std::uint_least16_t width() const;
		//! Is rect empty.
		bool empty() const;
		
		// Operators
	public:
		//! To RECT structure operator.
		operator RECT() const;

		// Construction/Destruction
	public:
		Rect(std::uint16_t Left = 0, std::uint16_t Top = 0, std::uint16_t Right = 0, std::uint16_t Bottom = 0);
	};

	inline std::uint16_t Rect::left() const
	{
		return m_Left;
	}
	
	inline std::uint16_t Rect::right() const
	{
		return m_Right;
	}
	
	inline std::uint16_t Rect::top() const
	{
		return m_Top;
	}
	
	inline std::uint16_t Rect::bottom() const
	{
		return m_Bottom;
	}
} /*sgp*/} /*ja2*/
